var layer
layui.use('layer', function () {
    layer = layer
})

layui.use(['form', 'jquery', 'layer'], function () {

    var form = layui.form;
    var layer = layui.layer;

    form.on('input(formDemo)', function (data) {

        console.log(1111111)

        window.alert("卧槽")

        $.ajax({
            url: "",
            data: "orderId=" + orderId + "&aftSaleSolve=未处理" + "&aftRequi=" + $("#downbox option:selected").text(),
            asyne: false,
            dataType: "json",
            type: "get",
            success: function (data) {
                if (data.code === 0) {
                    setTimeout(function () {
                        layer.msg('2秒后将会跳转回上个页面')
                    }, 2000)
                    layer.msg('提交成功了')
                    setTimeout(function () {
                        window.history.back(-1)
                    }, 4000);
                } else {
                    layer.msg('提交失败了')
                }
            }
        })
    })
    return false;
})

